<!-- saved from url=(0014)about:internet -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>global.as</title>
<link rel="stylesheet" type="text/css" href="../../SourceStyles.css"/>
</head>

<body><pre><span class="ActionScriptComment">// ActionScript file
</span><span class="ActionScriptComment">/*
* 全局控制的接口
*/</span>
<span class="ActionScriptReserved">import</span> <span class="ActionScriptDefault_Text">mx</span>.<span class="ActionScriptDefault_Text">events</span>.<span class="ActionScriptDefault_Text">CloseEvent</span>;
<span class="ActionScriptComment">//跳转到订票菜单
</span><span class="ActionScriptReserved">private</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">backToIndex</span><span class="ActionScriptBracket/Brace">()</span><span class="ActionScriptOperator">:</span><span class="ActionScriptReserved">void</span>
<span class="ActionScriptBracket/Brace">{</span>
    <span class="ActionScriptDefault_Text">currentState</span><span class="ActionScriptOperator">=</span><span class="ActionScriptString">&quot;index&quot;</span>;
<span class="ActionScriptBracket/Brace">}</span>

<span class="ActionScriptComment">//跳转到主菜单
</span><span class="ActionScriptReserved">private</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">backToNavi</span><span class="ActionScriptBracket/Brace">()</span><span class="ActionScriptOperator">:</span><span class="ActionScriptReserved">void</span>
<span class="ActionScriptBracket/Brace">{</span>
    <span class="ActionScriptDefault_Text">currentState</span><span class="ActionScriptOperator">=</span><span class="ActionScriptString">&quot;navi&quot;</span>;
<span class="ActionScriptBracket/Brace">}</span>

<span class="ActionScriptComment">//跳转到管理菜单选择界面
</span><span class="ActionScriptReserved">private</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">backToAdmin</span><span class="ActionScriptBracket/Brace">()</span><span class="ActionScriptOperator">:</span><span class="ActionScriptReserved">void</span>
<span class="ActionScriptBracket/Brace">{</span>
    <span class="ActionScriptDefault_Text">currentState</span><span class="ActionScriptOperator">=</span><span class="ActionScriptString">&quot;admin&quot;</span>;
<span class="ActionScriptBracket/Brace">}</span>

<span class="ActionScriptComment">//跳转到航班管理界面
</span><span class="ActionScriptReserved">private</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">backToFlight</span><span class="ActionScriptBracket/Brace">()</span><span class="ActionScriptOperator">:</span><span class="ActionScriptReserved">void</span>
<span class="ActionScriptBracket/Brace">{</span>
    <span class="ActionScriptDefault_Text">currentState</span><span class="ActionScriptOperator">=</span><span class="ActionScriptString">&quot;flight&quot;</span>;
<span class="ActionScriptBracket/Brace">}</span>

<span class="ActionScriptReserved">private</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">backToFlight2</span><span class="ActionScriptBracket/Brace">()</span><span class="ActionScriptOperator">:</span><span class="ActionScriptReserved">void</span>
<span class="ActionScriptBracket/Brace">{</span>
    <span class="ActionScriptDefault_Text">currentState</span><span class="ActionScriptOperator">=</span><span class="ActionScriptString">&quot;flight2&quot;</span>;
<span class="ActionScriptBracket/Brace">}</span>

<span class="ActionScriptReserved">private</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">backToFlight3</span><span class="ActionScriptBracket/Brace">()</span><span class="ActionScriptOperator">:</span><span class="ActionScriptReserved">void</span>
<span class="ActionScriptBracket/Brace">{</span>
    <span class="ActionScriptDefault_Text">currentState</span><span class="ActionScriptOperator">=</span><span class="ActionScriptString">&quot;flight3&quot;</span>;
<span class="ActionScriptBracket/Brace">}</span>

<span class="ActionScriptComment">//跳转到退票单
</span><span class="ActionScriptReserved">private</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">backToUnsub</span><span class="ActionScriptBracket/Brace">()</span><span class="ActionScriptOperator">:</span><span class="ActionScriptReserved">void</span>
<span class="ActionScriptBracket/Brace">{</span>
    <span class="ActionScriptDefault_Text">currentState</span><span class="ActionScriptOperator">=</span><span class="ActionScriptString">&quot;unSub&quot;</span>;
<span class="ActionScriptBracket/Brace">}</span>

<span class="ActionScriptComment">//推出登录
</span><span class="ActionScriptReserved">private</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">backToBase</span><span class="ActionScriptBracket/Brace">()</span><span class="ActionScriptOperator">:</span><span class="ActionScriptReserved">void</span>
<span class="ActionScriptBracket/Brace">{</span>
    <span class="ActionScriptDefault_Text">currentState</span><span class="ActionScriptOperator">=</span><span class="ActionScriptString">&quot;&quot;</span>;
<span class="ActionScriptBracket/Brace">}</span>

<span class="ActionScriptComment">//响应订票成功，退票成功事件            
</span><span class="ActionScriptReserved">private</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">alertHandler</span><span class="ActionScriptBracket/Brace">(</span> <span class="ActionScriptDefault_Text">evt</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">CloseEvent</span> <span class="ActionScriptBracket/Brace">)</span><span class="ActionScriptOperator">:</span><span class="ActionScriptReserved">void</span>
<span class="ActionScriptBracket/Brace">{</span>
    <span class="ActionScriptReserved">if</span><span class="ActionScriptBracket/Brace">(</span> <span class="ActionScriptDefault_Text">evt</span>.<span class="ActionScriptDefault_Text">detail</span> <span class="ActionScriptOperator">==</span> <span class="ActionScriptDefault_Text">Alert</span>.<span class="ActionScriptDefault_Text">YES</span> <span class="ActionScriptBracket/Brace">)</span>
        <span class="ActionScriptDefault_Text">currentState</span><span class="ActionScriptOperator">=</span><span class="ActionScriptString">&quot;navi&quot;</span>;
<span class="ActionScriptBracket/Brace">}</span></pre></body>
</html>
